<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
    <ul>
        {% for comment in comments %}
            <li>{{ comment.content|safe }}</li>
        {% endfor %}
    </ul>

    <form action="{% url 'comment' %}" method="post">
        {% csrf_token %}
        <textarea name="content" id="" cols="30" rows="3"></textarea>
        <p>
            <input type="submit" value="提交">
        </p>
    </form>
</body>
</html>